trig integral with the product formula